package idp.utils;

import javax.swing.JOptionPane;

public abstract class UserInput {
	public static final String DIALOG_TITLE = "De FIKINGS Dashboard";
	public static String getUserSelection(String question, String[] options) {
		String value = (String) JOptionPane.showInputDialog(null, question,
				DIALOG_TITLE, JOptionPane.INFORMATION_MESSAGE, null, options,
				options[0]);
		return value;
	}

	public static Object getUserSelection(String question, Object[] options) {
		Object value = JOptionPane.showInputDialog(null, question, DIALOG_TITLE,
				JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
		return value;
	}
	
	public static boolean getUserYesNO(String question){
		int value = JOptionPane.showConfirmDialog(null, question, DIALOG_TITLE, JOptionPane.YES_NO_OPTION);
		return(value == JOptionPane.YES_OPTION);
	}
}
